home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 16
/
Aminet 16 (1996)(GTI - Schatztruhe)[!][Dec 1996].iso
/
Aminet
/
dev
/
lang
/
uc_0_30.lha
/
u
/
rdocs
/
r0004.doc
< prev
next >
Wrap
Text File
|
1996-10-30
|
2KB
|
69 lines
**********************
* P R O J E C T < U >
*
* Author and copyright
* (c) 1996
* Paul van der Valk
*
* file: r0004.doc
* last updated: 30-oct-96
THE UDB FILEFORMAT
Introduction
------------
UDB (U-Database) is an abstract database that can handle variable
sized record. It doesn't bother with the actual contents of these
records, it just deals with the storage and retrieval aspects.
UDB defines a field that describes an app-class. It's up to
that class to define the meaning and contents of the record
data. This scheme is comparable to the Amiga IFF format,
where IFF (transparantly) implements the storage, and the various
subformats (ILBM, 8SVX, ...) deal with the data.
Only one UDB-app-class is currently publicly defined: UCode
(app-class = (hex) DB1DEA01). For a definition of the UCode
format refer to r0005.doc.
The fileformat
--------------
The UDB fileformat consists of an array of unsigned 32 bit integers,
hereafter refered to as 'ulong'. These integers are stored in big-endian
mode (most significant byte first).
The database file consists of 2 parts: the database header and the
recorddata.
Database Header ::=
{
ulong MagicID * the hexadecimal constant DBC0DE01
ulong Version * version of this fileformat
ulong AppID * application identifying tag
ulong AppUsr * application specific field
ulong HighRecord * highest recordnumber in this database
ulong Reserved1 * reserved - keep 0
ulong Reserved2 * reserved - keep 0
ulong Reserved3 * reserved - keep 0
}
Record Data ::=
{
zero or more instances of Record * see below
ulong 0 * end of records marker
}
Record ::=
{
ulong RecNum * record number (0 for end of data)
ulong RecSize * size of the datablock in bytes
* must be dividable by 4
<data> DataBlock * <RecSize> bytes of data
}